package com.zhongkai.model3;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;

@Entity
@Table(name = "guard",    catalog = "")
public class Guard implements Serializable {
    private Long id;
    private String guaUuid;
    private String guaSex;
    private String guaName;
    private String guaUser;
    private String guaPhone;
    private String guaPass;
    private String guaState;
    private String guaRemove;
    private Long guaTime;
    private Long guaMoTime;
    private String ordUuid;
    private String ordUsers;
    private String guaSigna; //签名
    private String guaImg; //头像
    private String guaToken; //token
    private Integer guaLevel; //等级


    public Integer getGuaLevel() {
        return guaLevel;
    }

    public void setGuaLevel(Integer guaLevel) {
        this.guaLevel = guaLevel;
    }

    public String getGuaToken() {
        return guaToken;
    }

    public void setGuaToken(String guaToken) {
        this.guaToken = guaToken;
    }

    public String getGuaSigna() {
        return guaSigna;
    }

    public void setGuaSigna(String guaSigna) {
        this.guaSigna = guaSigna;
    }

    public String getGuaImg() {
        return guaImg;
    }

    public void setGuaImg(String guaImg) {
        this.guaImg = guaImg;
    }

    @Basic
    @Column(name = "ord_users")
    public String getOrdUsers() {
        return ordUsers;
    }

    public void setOrdUsers(String ordUsers) {
        this.ordUsers = ordUsers;
    }

    @Id
    @GenericGenerator(name = "generator", strategy = "increment")
    @GeneratedValue(generator = "generator")
    @Column(name = "id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "gua_uuid")
    public String getGuaUuid() {
        return guaUuid;
    }

    public void setGuaUuid(String guaUuid) {
        this.guaUuid = guaUuid;
    }

    @Basic
    @Column(name = "gua_sex")
    public String getGuaSex() {
        return guaSex;
    }

    public void setGuaSex(String guaSex) {
        this.guaSex = guaSex;
    }

    @Basic
    @Column(name = "gua_name")
    public String getGuaName() {
        return guaName;
    }

    public void setGuaName(String guaName) {
        this.guaName = guaName;
    }

    @Basic
    @Column(name = "gua_user")
    public String getGuaUser() {
        return guaUser;
    }

    public void setGuaUser(String guaUser) {
        this.guaUser = guaUser;
    }

    @Basic
    @Column(name = "gua_phone")
    public String getGuaPhone() {
        return guaPhone;
    }

    public void setGuaPhone(String guaPhone) {
        this.guaPhone = guaPhone;
    }

    @Basic
    @Column(name = "gua_pass")
    public String getGuaPass() {
        return guaPass;
    }

    public void setGuaPass(String guaPass) {
        this.guaPass = guaPass;
    }

    @Basic
    @Column(name = "gua_state")
    public String getGuaState() {
        return guaState;
    }

    public void setGuaState(String guaState) {
        this.guaState = guaState;
    }

    @Basic
    @Column(name = "gua_remove")
    public String getGuaRemove() {
        return guaRemove;
    }

    public void setGuaRemove(String guaRemove) {
        this.guaRemove = guaRemove;
    }

    @Basic
    @Column(name = "gua_time")
    public Long getGuaTime() {
        return guaTime;
    }

    public void setGuaTime(Long guaTime) {
        this.guaTime = guaTime;
    }

    @Basic
    @Column(name = "gua_mo_time")
    public Long getGuaMoTime() {
        return guaMoTime;
    }

    public void setGuaMoTime(Long guaMoTime) {
        this.guaMoTime = guaMoTime;
    }

    @Basic
    @Column(name = "ord_uuid")
    public String getOrdUuid() {
        return ordUuid;
    }

    public void setOrdUuid(String ordUuid) {
        this.ordUuid = ordUuid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Guard guard = (Guard) o;
        return Objects.equals(id, guard.id) &&
                Objects.equals(guaUuid, guard.guaUuid) &&
                Objects.equals(guaSex, guard.guaSex) &&
                Objects.equals(guaName, guard.guaName) &&
                Objects.equals(guaUser, guard.guaUser) &&
                Objects.equals(guaPhone, guard.guaPhone) &&
                Objects.equals(guaPass, guard.guaPass) &&
                Objects.equals(guaState, guard.guaState) &&
                Objects.equals(guaRemove, guard.guaRemove) &&
                Objects.equals(guaTime, guard.guaTime) &&
                Objects.equals(guaMoTime, guard.guaMoTime) &&
                Objects.equals(ordUuid, guard.ordUuid);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, guaUuid, guaSex, guaName, guaUser, guaPhone, guaPass, guaState, guaRemove, guaTime, guaMoTime, ordUuid);
    }
}
